package fun.liuyu2783.dtc.order.controller;

import fun.liuyu2783.dtc.common.Response;
import fun.liuyu2783.dtc.order.dto.OrderInfo;
import fun.liuyu2783.dtc.order.service.OrderInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liuyu2783
 * @since 2021-11-23
 */
@Slf4j
@RestController
@RequestMapping("/order")
public class OrderInfoController {

    @Autowired
    private OrderInfoService orderInfoService;

    @RequestMapping("/add/{id}")
    public Response add(@PathVariable("id") String id){
        return orderInfoService.createOrder(id);
    }

}

